package com.baox.agridata.synchronous.dao;


import com.baomidou.dynamic.datasource.annotation.DS;
import com.baox.agridata.synchronous.entity.TCCAAEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface TCCAAMapper {


    /**
     * 根据mid查询动物B证数据
     *
     * @param mid
     * @return
     */
    @DS("sichuanc")
    TCCAAEntity selectTCCAAById(@Param("mid") String mid);


    /**
     * 插入动物A证
     *
     * @param tccaaEntity
     * @return
     */
    @DS("sichuanz")
    Integer insertIntoTCCAA(TCCAAEntity tccaaEntity);


    /**
     * 动物A证数据更新
     *
     * @param tccaaEntity
     * @return
     */
    @DS("sichuanz")
    Integer updateTCCAAById(TCCAAEntity tccaaEntity);


    /**
     * 成都A证数据已回收后，将数据状态返回给成都
     *
     * @param createTime
     * @return
     */
    @DS("sichuanc")
    List<TCCAAEntity> selectChengDuAnimalALandingBack(@Param("createTime") String createTime, @Param("endTime") String endTime);


    /**
     * 查询四川接收到成都的动物A证数据
     *
     * @param startTime
     * @param endTime
     * @return
     */
    @DS("sichuanc")
    Integer selectSiChuanReceiveCDAnimalA(@Param("startTime") String startTime, @Param("endTime") String endTime);


}
